<?php $this->render("header.php");?>

<!--幻灯片-->
<div class="home_pho_box line_bg">
	<div class="w_980">
    	<div class="home_pho_l index_bg f_l link_white">
        	<ul class="home_pho_txt_ul home_pho_stop" id="home_pho_msg">
        	<?php
        	foreach ($this->idata['tpxw'] as $v):
        	$url = $this->url($this->baseUrl, "news", "detail", "aid=" . $v['aid']);
        	
        	$v_title = htmlspecialchars($v['title']);
        	$v['intro'] = strip_tags($v['intro']);
        	$v_intro = mb_cut(($v['intro']), 170); 
        	
        	$v_detail = _("index_detail");
        	print  <<<EOT
            	<li>
                	<dl>
                    	<dt class="f_family f_normal"><a href="{$url}" title="{$v_title}" target="_self">$v_title</a></dt>
                        <dd class="dd_txt">$v_intro</dd>
                        <dd class="dd_btn">
                        	<div class="btn_detail index_bg f_family f_r">
                            	<a href="{$url}" title="{$v_detail}" target="_self">{$v_detail}>></a> 
                            </div>
                      </dd>
                    </dl>
                </li>
EOT;
endforeach;
?>
            </ul>
        </div>
        <div class="home_pho_r f_r">
        	<div class="home_pho_img home_pho_stop" id="home_pho_img">
        <?php
        	foreach ($this->idata['tpxw'] as $v):
        	$url = $this->url($this->baseUrl, "news", "detail", "aid=" . $v['aid']);
        	
        	$v_image = $this->baseUrl  . $v['image'];
        	print  <<<EOT
            	<a href="{$url}" target="_self"><img src="{$v_image}" width="510" height="340" /></a>
EOT;
endforeach;
?>
            </div>
            <div class="pho_img_bottom index_bg"></div>
            <div class="pho_img_btn" id="home_pho_btn">
            <?php
        	foreach ($this->idata['tpxw'] as $v):
        	if (!isset($hov))
        		$hov = " hov";
        	else
        		$hov = "";
        		
        	print  <<<EOT
            	<span class="index_bg{$hov}"></span>
EOT;
endforeach;
?>
            </div>
      </div>
    	<div class="clear"></div>
    </div>
</div>
<!--幻灯片 end-->

<div class="home_main">
	<div class="w_984">
    	<div class="f_l home_sider">
        	<div class="index_plate_bg sid_top"></div>
            <div class="sid_content index_plate_bg">
            	<h2 class="h2_title"><span class="f_l"><?php echo _("index_tzgg");?></span><span class="more"><i class="icon_all icon_more"></i><a href="<?php echo $this->url($this->baseUrl, "news", "list", "cid=" . $this->cfg['listtype']['tzgg']);?>" target="_self"><?php echo _("index_more");?></a></span></h2>
          <div class="content" style="margin-bottom:20px;">
           	    	<ul class="ul_list_a_26">
           	    	<?php
           	    	foreach ($this->idata['tzgg'] as $v){
           	    		$url = $this->url($this->baseUrl, "news", "detail", "aid=" . $v['aid']);
           	    		$title = htmlspecialchars($v['title']);
           	    		print <<<EOT
                    	<li><a href="{$url}" title="{$title}" target="_self"><strong>·</strong>{$title}</a></li>
EOT;
}
?>
                    </ul>
                </div>
                
                <h2 class="h2_title"><span class="f_l"><?php echo _("index_ltrw");?></span><span class="more"><i class="icon_all icon_more"></i><a href="<?php echo $this->url($this->baseUrl, "news", "list", "type=" . $this->cfg['listtype']['ltrw']);?>" target="_self"><?php echo _("index_more");?></a></span></h2>
                <div class="content link_deep_red">
                
                
                
                
                
                
                
                
                <div class="home_bbs_box">
                        <div class="home_bbs_main" id="index_ltrw_top">
                <?php
                foreach ($this->idata['ltrw_top'] as $v){
                	$url = $this->url($this->baseUrl, "news", "detail", "aid=" . $v['aid']);                	
           	    	$title = htmlspecialchars($v['title']);
           	    	$subtitle = htmlspecialchars($v['subtitle']);
           	    	$v_image = $this->baseUrl . $v['image'];
                	print <<<EOT
                            <dl class="dl_img_title_txt clear_box">
                                <dt><a href="$url" title="$title" target="_blank">$title</a></dt>
                                <dd class="dd_img"><a href="$url"><img src="$v_image" width="61" height="76" /></a></dd>
                                <dd class="dd_txt">$subtitle</dd>
                            </dl>
EOT;
}
?>
                        </div>
                    </div>
                
                <ul class="ul_list_a_24 c_gray6">
           	    <?php
                foreach ($this->idata['ltrw_list'] as $v){
                	$url = $this->url($this->baseUrl, "news", "detail", "aid=" . $v['aid']);                	
           	    	$title = htmlspecialchars($v['title']);
           	    	$author = htmlspecialchars($v['author']);
                	print <<<EOT
               	    <li><a href="$url" title="$title" target="_self">$title</a> $author</li>
EOT;
} ?>
                    </ul>
                    <div class="clear"></div>
              </div>
       	  </div>
            <div class="index_plate_bg sid_bot"></div>
        </div>
        <div class="f_l home_middle">
        	<div class="index_plate_bg mid_top"></div>
            <div class="mid_content index_plate_bg">
            	<h2 class="h2_title"><span class="f_l"><?php echo _("index_xwjj");?></span><span class="more"><i class="icon_all icon_more"></i><a href="<?php echo $this->url($this->baseUrl, "news", "list", "cid=1");?>" target="_self"><?php echo _("index_more");?></a></span></h2>
                <div class="content ">
                <?php
                foreach ($this->idata['xwjj'] as $v){
                	$v_title = htmlspecialchars($v['title']);
                	$v_url = $this->url($this->baseUrl, "news", "detail", "aid=" . $v['aid']);
                	$v_intro = htmlspecialchars($v['intro']);
                	$v_image = $this->baseUrl . $v['image'];
                	$v_intro = mb_cut($v_intro, 70);
                	$v_detail = _("index_detail");
                	print <<<EOT
                	<dl class="dl_img_title_txt_big clear_box link_deep_red">
                    	<dt><a href="{$v_url}" title="{$v_title}" target="_self">{$v_title}</a></dt>
                        <dd class="dd_img"><a href="{$v_url}"><img src="{$v_image}" width="200" height="145" /></a></dd>
                        <dd class="dd_txt">{$v_intro}<a href="{$v_url}" title="[{$v_detail}]" target="_self">[{$v_detail}]</a></dd>
                    </dl>
EOT;
break;
}
?>
                    <ul class="ul_list_a_26">
                    <?php
                    $seq = 0;
                    foreach ($this->idata['xwjj_list'] as $v){
                	$v_title = htmlspecialchars($v['title']);
                	$v_url = $this->url($this->baseUrl, "news", "detail", "aid=" . $v['aid']);
                	$v_intro = htmlspecialchars($v['intro']);
                	$v_image = $this->baseUrl . $v['image'];
                	$v_detail = _("index_detail");
                	print <<<EOT
                    	<li><a href="{$v_url}" title=""{$v_title}" target="_self"><strong>·</strong>{$v_title}</a></li>
EOT;
                    }
?>
                    </ul>
                </div>
                <h2 class="h2_title"><span class="f_l"><?php echo _("index_ztbd");?></span><span class="more"><i class="icon_all icon_more"></i><a href="<?php echo $this->url($this->baseUrl, "news", "list", "cid=2");?>" target="_self"><?php echo _("index_more");?></a></span></h2>
                <div class="content">
                	<ul class="ul_list_a_26">
                	<?php
                    foreach ($this->idata['ztbd'] as $v){
                	$v_title = htmlspecialchars($v['title']);
                	$v_url = $this->url($this->baseUrl, "news", "detail", "aid=" . $v['aid']);
                	$v_intro = htmlspecialchars($v['intro']);
                	$v_image = $this->baseUrl . $v['image'];
                	$v_detail = _("index_detail");
                	print <<<EOT
                    	<li><strong>·</strong> <span class="link_deep_red"><a href="{$v_url}" target="_self">[{$v['typename']}]</a></span> <a href="{$v_url}" title="{$v_title}" target="_self">{$v_title}</a></li>
EOT;
                    }
?>
                    </ul>
                </div>
            </div>
        	<div class="index_plate_bg mid_bot"></div>
        </div>
        
        <div class="f_r home_sider">
        	<div class="index_plate_bg sid_top"></div>
            <div class="sid_content index_plate_bg">
            	<h2 class="h2_title"><span class="f_l"><?php echo _("index_xshd");?></span><span class="more"><i class="icon_all icon_more"></i><a href="<?php echo $this->url($this->baseUrl, "news", "list", "type=" . $this->cfg['listtype']['xshd']);?>" target="_self"><?php echo _("index_more");?></a></span></h2>
          <div class="content" >
           	    	<ul class="ul_list_a_24">
           	    	<?php
                    foreach ($this->idata['xshd'] as $v){
                	$v_title = htmlspecialchars($v['title']);
                	$v_url = $this->url($this->baseUrl, "news", "detail", "aid=" . $v['aid']);
                	print <<<EOT
                    	<li><a href="{$v_url}" title="{$v_title}" target="_self"><strong>·</strong>{$v_title}</a></li>
EOT;
}
?>
                    </ul>
                </div>
                
                <h2 class="h2_title"><span class="f_l"><?php echo _("index_pub");?></span><span class="more"><i class="icon_all icon_more"></i><a href="<?php echo $this->url($this->baseUrl, "publication", "list", "");?>" target="_self"><?php echo _("index_more");?></a></span></h2>
            <div class="content link_deep_red book_box">
                	<div class="f_l book_l"><span class="icon_left index_bg" id="book_icon_left"></span></div>
                    <div class="f_l book_mid">
                    	<ul class="book_mid_ul" id="book_mid_ul">
                    <?php
                    foreach ($this->idata['publication'] as $v){
                	$v_title = htmlspecialchars($v['name']);
                	$v_url = $this->url($this->baseUrl, "publication", "detail", "pid=" . $v['pid']);
                	$v_image = $this->baseUrl . $v['image'];
                	print <<<EOT
                        	<li><a href="{$v_url}" target="_self" title="$v_title"><img src="{$v_image}" width="130" height="184" alt="$v_title" />{$v_title}</a></li>
EOT;
}?>
                        </ul>
          			</div>
                    <div class="f_r book_r"><span class="icon_right index_bg" id="book_icon_right"></span></div>
                    <div class="clear"></div>
              </div>
       	  </div>
            <div class="index_plate_bg sid_bot"></div>
        </div>
        
        <div class="clear"></div>
    </div>
</div>


<?php $this->render("footer.php");?>

<?php 
$content = FileCache::getInstance()->get("index_image");
if (is_array($content) && $content['display'] == true && !empty($content['image'])){
	$exist = file_exists(APP . $content['image']);
	if ($exist){
	$info = getimagesize(APP . $content['image']);
	$info['width'] = $info[0];
	$info['height'] = $info[1];

	echo <<<EOT
	<div id="index_image" style="Z-INDEX: 100; LEFT: 2px; WIDTH: {$info['width']}px; POSITION: absolute; TOP: 43px; HEIGHT: {$info['height']}px; visibility: visible;">
		<a href="{$content['url']}" target="_blank"><img src="{$this->baseUrl}{$content['image']}" width="{$info['width']}" height="{$info['height']}" border="0"></a>
	</div>
 <script>$(function (){
	start();
});</script>
EOT;
	}
}
?>
<script type="text/javascript" src="js/home_pho.js"></script>
</body>
</html>
